import {FC} from 'react'
import {Button} from 'antd'
import { useNavigate } from 'react-router-dom'
import './index.css'

const Heard: FC = () => {
  const navigate = useNavigate()
  const handleTongyong: () => void = (): void => {
    navigate('/')
  }
  const handleBuju: () => void = (): void => {
    navigate('/buju')
  }
  const handleDaoHang: () => void = (): void => {
    navigate('/daohang')
  }
  const handleShuJuLuRu: () => void = (): void => {
    navigate('/shujuluru')
  }
  const handleShuJuZhanShi: () => void = (): void => {
    navigate('/shujuzhanshi')
  }
  const handleFanKui: () => void = (): void => {
    navigate('/fankui')
  }
  const handleYangShi: () => void = (): void => {
    navigate('/yangshi')
  }
  const handleStudy: () => void = (): void => {
    navigate('/study')
  }
  return (
      <div className={'parent-div'}>
        <Button type='primary' onClick={handleTongyong}>通用</Button>
        <Button type='primary' onClick={handleBuju}>布局</Button>
        <Button type='primary' onClick={handleDaoHang}>导航</Button>
        <Button type='primary' onClick={handleShuJuLuRu}>数据录入</Button>
        <Button type='primary' onClick={handleShuJuZhanShi}>数据展示</Button>
        <Button type='primary' onClick={handleFanKui}>反馈</Button>
        <Button type='primary' onClick={handleYangShi}>样式</Button>
        <Button type='primary' onClick={handleStudy}>学习</Button>
      </div>
  )
}
export default Heard
